using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class SceneLoadTrigger : MonoBehaviour
{
    [SerializeField] private SceneField _levelScene;//加载场景
    [SerializeField] private Button btnAdventure;//冒险模式按钮

    private void Start() {
        btnAdventure.onClick.AddListener(StartAdventure);
    }

    //开始冒险模式
    public void StartAdventure()
    {
        AudioManager.Instance.PlaySFX("点击");
        AudioManager.Instance.PlayMusic("bgm4");
        //加载场景
        SceneManager.LoadScene(_levelScene);
        //清除 DOTween 库中当前正在进行的所有动画和补间
        // DOTween.Clear();
    }
}
